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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.z: A = None
        self.o: H = None
        self.s: C = None
        self.q: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: D = None
        self.u: H = None
        self.r: B = None
        self.z: E = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

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

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

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

f = A("f")
e = B("e")
n = C("n")
h = D("h")
j = E("j")
b = F("b")
g = G("g")
c = H("c")

f.u = j
e.p = n
e.s = n
e.u = n
e.v = h
e.z = f
e.o = c
e.q = b
e.y = b
n.x = c
n.u = c
n.o = h
n.r = e
n.v = e
n.z = j
n.s = j
h.t = b
h.s = j
h.q = j
h.u = f
h.r = f
h.x = g
h.p = n
j.p = e
j.t = c
j.z = c
j.y = h
b.u = f
b.w = n
b.o = h
g.s = c
g.u = h
g.y = n
c.u = n
assert e.z.u.y.u.u.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.z: A = None
        self.o: H = None
        self.s: C = None
        self.q: F = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: D = None
        self.u: H = None
        self.r: B = None
        self.z: E = None
        self.v: B = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

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

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

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

f = A("f")
e = B("e")
n = C("n")
h = D("h")
j = E("j")
b = F("b")
g = G("g")
c = H("c")

f.u = j
e.p = n
e.s = n
e.u = n
e.v = h
e.z = f
e.o = c
e.q = b
e.y = b
n.x = c
n.u = c
n.o = h
n.r = e
n.v = e
n.z = j
n.s = j
h.t = b
h.s = j
h.q = j
h.u = f
h.r = f
h.x = g
h.p = n
j.p = e
j.t = c
j.z = c
j.y = h
b.u = f
b.w = n
b.o = h
g.s = c
g.u = h
g.y = n
c.u = n
assert e.z.u.y.u.u.t.u.txt == "n"