class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: D = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.s: B = None
        self.u: C = None
        self.w: G = None
        self.r: D = None
        self.o: B = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.s: B = None
        self.u: C = None
        self.w: G = None
        self.r: D = None
        self.o: B = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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