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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.z: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.w: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.v: A = None
        self.r: F = None
        self.z: F = None
        self.p: A = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.w: H = None
        self.q: B = None
        self.x: F = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

l.q = g
l.y = f
m.p = g
m.r = j
m.z = e
m.o = k
d.w = k
a.x = d
a.p = g
a.w = f
a.o = l
e.z = d
c.t = k
c.q = k
c.u = f
c.v = l
c.p = l
c.r = j
c.z = j
c.w = e
k.y = d
k.v = d
k.s = d
k.w = g
k.q = m
k.x = j
g.w = l
g.z = e
f.q = g
f.y = l
j.t = k
j.q = k
j.u = f
j.v = f
j.r = c
j.z = c
j.p = l
j.w = e
assert g.z.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.z: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.w: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.v: A = None
        self.r: F = None
        self.z: F = None
        self.p: A = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.w: H = None
        self.q: B = None
        self.x: F = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

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