class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.w: D = None
        self.x: F = None
        self.y: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.o: B = None
        self.s: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.z: A = None
        self.o: E = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

c.u = i
c.w = i
c.y = i
c.t = e
c.x = e
c.r = d
d.o = e
d.p = c
d.u = i
d.v = i
k.t = g
k.y = b
i.o = c
i.z = b
b.p = e
b.q = k
b.w = k
b.o = d
b.s = i
e.y = k
e.x = k
e.r = b
e.o = b
e.p = b
e.z = c
g.r = e
g.y = d
assert i.o.r.p.w.o.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.w: D = None
        self.x: F = None
        self.y: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.o: B = None
        self.s: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.z: A = None
        self.o: E = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

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