class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: B = None
        self.q: E = None
        self.p: D = None
        self.w: E = None
        self.o: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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