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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

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

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

l.z = d
l.x = m
l.q = c
b.z = n
b.u = e
b.r = i
b.y = i
b.s = f
b.x = d
b.t = d
d.q = c
d.s = n
d.o = l
j.p = e
i.t = e
i.p = b
c.z = f
c.q = d
c.s = j
c.u = b
e.o = d
e.y = m
n.z = f
n.q = d
n.s = j
n.u = b
f.p = e
m.z = d
m.x = l
m.q = n
assert m.z.s.u.txt == "b"