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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.w: E = None
        self.v: G = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.w: E = None
        self.v: G = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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