class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.z: G = None
        self.r: B = None
        self.t: E = None
        self.w: F = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.v: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.w: C = None
        self.z: I = None
        self.p: H = None
        self.t: C = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.q: G = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

g = A("g")
j = B("j")
d = C("d")
k = D("k")
l = E("l")
i = F("i")
m = G("m")
b = H("b")
c = I("c")

g.q = d
g.x = d
g.v = j
g.r = j
g.z = m
g.t = l
g.w = i
g.y = i
j.s = i
j.y = c
j.r = l
j.p = d
d.s = g
d.r = k
k.o = g
l.o = d
l.x = i
l.v = k
l.t = b
i.y = c
i.z = c
i.r = k
i.w = d
i.t = d
i.p = b
i.v = b
i.x = g
m.t = i
m.q = d
b.t = l
b.p = l
b.v = g
b.q = m
b.y = m
c.w = k
assert l.o.r.o.y.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.z: G = None
        self.r: B = None
        self.t: E = None
        self.w: F = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.v: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.w: C = None
        self.z: I = None
        self.p: H = None
        self.t: C = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.q: G = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

g = A("g")
j = B("j")
d = C("d")
k = D("k")
l = E("l")
i = F("i")
m = G("m")
b = H("b")
c = I("c")

g.q = d
g.x = d
g.v = j
g.r = j
g.z = m
g.t = l
g.w = i
g.y = i
j.s = i
j.y = c
j.r = l
j.p = d
d.s = g
d.r = k
k.o = g
l.o = d
l.x = i
l.v = k
l.t = b
i.y = c
i.z = c
i.r = k
i.w = d
i.t = d
i.p = b
i.v = b
i.x = g
m.t = i
m.q = d
b.t = l
b.p = l
b.v = g
b.q = m
b.y = m
c.w = k
assert l.o.r.o.y.x.q.txt == "d"