class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.v: C = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

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

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

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

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