class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.u: F = None
        self.x: C = None
        self.t: G = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

l = A("l")
k = B("k")
g = C("g")
c = D("c")
f = E("f")
b = F("b")
e = G("e")

l.w = g
l.y = g
l.x = g
l.u = b
l.t = e
l.o = k
l.z = f
k.s = l
k.t = f
k.y = f
k.z = e
k.v = b
k.u = g
k.x = c
g.r = b
g.x = f
c.u = g
c.w = l
f.u = g
f.v = g
f.y = g
f.t = b
f.r = c
f.p = e
b.t = l
b.z = c
b.r = c
e.x = b
assert b.t.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.u: F = None
        self.x: C = None
        self.t: G = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

l = A("l")
k = B("k")
g = C("g")
c = D("c")
f = E("f")
b = F("b")
e = G("e")

l.w = g
l.y = g
l.x = g
l.u = b
l.t = e
l.o = k
l.z = f
k.s = l
k.t = f
k.y = f
k.z = e
k.v = b
k.u = g
k.x = c
g.r = b
g.x = f
c.u = g
c.w = l
f.u = g
f.v = g
f.y = g
f.t = b
f.r = c
f.p = e
b.t = l
b.z = c
b.r = c
e.x = b
assert b.t.u.r.txt == "c"