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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: G = None
        self.t: B = None
        self.z: A = None
        self.q: B = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.w: D = None
        self.t: G = None
        self.y: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.r: C = None
        self.v: D = None
        self.p: B = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

l = A("l")
f = B("f")
a = C("a")
d = D("d")
i = E("i")
k = F("k")
c = G("c")
m = B("m")
b = G("b")

l.u = a
l.z = c
f.o = a
f.r = a
f.p = b
f.x = b
f.t = m
f.q = m
f.z = l
a.q = d
a.y = i
d.o = k
i.q = c
i.u = a
i.y = a
i.w = d
i.t = b
i.v = l
k.q = l
k.t = l
k.y = i
k.u = i
k.r = a
k.v = d
k.p = f
c.q = m
c.r = d
c.x = k
c.w = a
m.o = a
m.r = a
m.p = b
m.x = b
m.t = f
m.q = f
m.z = l
b.q = f
b.r = d
b.x = k
b.w = a
assert b.r.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: G = None
        self.t: B = None
        self.z: A = None
        self.q: B = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.w: D = None
        self.t: G = None
        self.y: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.r: C = None
        self.v: D = None
        self.p: B = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

l = A("l")
f = B("f")
a = C("a")
d = D("d")
i = E("i")
k = F("k")
c = G("c")
m = B("m")
b = G("b")

l.u = a
l.z = c
f.o = a
f.r = a
f.p = b
f.x = b
f.t = m
f.q = m
f.z = l
a.q = d
a.y = i
d.o = k
i.q = c
i.u = a
i.y = a
i.w = d
i.t = b
i.v = l
k.q = l
k.t = l
k.y = i
k.u = i
k.r = a
k.v = d
k.p = f
c.q = m
c.r = d
c.x = k
c.w = a
m.o = a
m.r = a
m.p = b
m.x = b
m.t = f
m.q = f
m.z = l
b.q = f
b.r = d
b.x = k
b.w = a
assert b.r.o.t.txt == "l"