class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.u: G = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: A = None
        self.z: D = None
        self.s: E = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.u: G = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: A = None
        self.z: D = None
        self.s: E = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

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

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

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