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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.p: G = None
        self.t: G = None
        self.y: G = None
        self.z: H = None
        self.r: D = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.x: C = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.p: G = None
        self.t: G = None
        self.y: G = None
        self.z: H = None
        self.r: D = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.x: C = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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