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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.x: C = None
        self.w: C = None
        self.o: D = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.x: C = None
        self.w: C = None
        self.o: D = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

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