class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: C = None
        self.r: D = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.p: A = None
        self.v: H = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.p: A = None
        self.v: H = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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