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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.x: E = None
        self.r: F = None
        self.t: B = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.x: E = None
        self.r: F = None
        self.t: B = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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