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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.s: B = None
        self.y: H = None
        self.txt = txt

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

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

e.t = h
e.y = h
e.p = c
e.v = c
e.w = k
e.x = m
h.x = c
h.y = m
a.p = m
a.x = f
l.x = a
l.t = e
k.t = e
k.s = n
k.z = h
k.r = h
m.y = a
m.t = k
n.v = e
n.t = m
n.s = h
n.y = c
c.r = g
c.u = a
c.y = f
c.t = f
c.s = e
c.z = e
c.w = h
g.p = m
g.x = n
f.v = e
f.t = m
f.s = h
f.y = c
assert a.p.y.x.y.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.p: H = None
        self.v: H = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.s: B = None
        self.y: H = None
        self.txt = txt

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

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

e.t = h
e.y = h
e.p = c
e.v = c
e.w = k
e.x = m
h.x = c
h.y = m
a.p = m
a.x = f
l.x = a
l.t = e
k.t = e
k.s = n
k.z = h
k.r = h
m.y = a
m.t = k
n.v = e
n.t = m
n.s = h
n.y = c
c.r = g
c.u = a
c.y = f
c.t = f
c.s = e
c.z = e
c.w = h
g.p = m
g.x = n
f.v = e
f.t = m
f.s = h
f.y = c
assert a.p.y.x.y.u.x.txt == "f"