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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: E = None
        self.v: A = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

b = A("b")
j = B("j")
k = C("k")
e = D("e")
m = E("m")
a = F("a")
c = G("c")
n = D("n")

b.w = c
b.u = k
b.o = k
b.y = k
b.s = m
j.s = c
j.x = c
j.o = m
j.v = b
j.q = e
k.v = a
k.s = a
k.o = a
k.y = c
k.t = c
k.w = m
e.y = c
m.x = a
a.u = b
a.p = j
c.z = e
n.y = c
assert a.u.w.z.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: C = None
        self.o: C = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: E = None
        self.v: A = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

b = A("b")
j = B("j")
k = C("k")
e = D("e")
m = E("m")
a = F("a")
c = G("c")
n = D("n")

b.w = c
b.u = k
b.o = k
b.y = k
b.s = m
j.s = c
j.x = c
j.o = m
j.v = b
j.q = e
k.v = a
k.s = a
k.o = a
k.y = c
k.t = c
k.w = m
e.y = c
m.x = a
a.u = b
a.p = j
c.z = e
n.y = c
assert a.u.w.z.y.z.txt == "e"