class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.u: D = None
        self.q: G = None
        self.p: C = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.u: C = None
        self.txt = txt

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

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