class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.s: A = None
        self.x: G = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: G = None
        self.x: G = None
        self.w: G = None
        self.s: G = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.y: A = None
        self.w: D = None
        self.u: D = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.s: A = None
        self.x: G = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: G = None
        self.x: G = None
        self.w: G = None
        self.s: G = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: H = None
        self.y: A = None
        self.w: D = None
        self.u: D = None
        self.o: E = None
        self.txt = txt

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

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