class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.o: E = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: H = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: H = None
        self.z: F = None
        self.y: D = None
        self.u: A = None
        self.r: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.q: E = None
        self.u: F = None
        self.s: D = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: G = None
        self.p: G = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

d = A("d")
l = B("l")
b = C("b")
f = D("f")
m = E("m")
n = F("n")
c = G("c")
j = H("j")
g = C("g")

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: H = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: H = None
        self.z: F = None
        self.y: D = None
        self.u: A = None
        self.r: D = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.q: E = None
        self.u: F = None
        self.s: D = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: G = None
        self.p: G = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

d = A("d")
l = B("l")
b = C("b")
f = D("f")
m = E("m")
n = F("n")
c = G("c")
j = H("j")
g = C("g")

d.x = c
d.t = b
d.o = m
d.q = m
d.s = n
l.q = m
l.y = b
b.x = j
b.y = j
b.s = f
b.u = g
f.u = m
f.s = d
m.x = b
m.q = j
m.t = j
m.z = n
m.y = f
m.r = f
m.u = d
n.x = l
n.v = d
n.u = f
c.v = f
c.s = f
c.r = f
c.y = n
c.u = n
c.q = m
c.o = l
j.z = b
j.q = c
j.p = c
j.v = f
j.s = f
g.x = j
g.y = j
g.s = f
g.u = b
assert n.x.y.u.u.s.u.txt == "m"