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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.p: E = None
        self.r: G = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

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

c = A("c")
f = B("f")
e = C("e")
a = D("a")
n = E("n")
l = F("l")
j = G("j")

c.t = f
c.z = a
f.p = n
f.w = j
f.u = j
f.z = a
f.o = e
e.r = l
e.s = a
e.x = n
a.t = c
a.y = j
a.r = j
a.s = j
n.y = a
l.z = j
l.r = j
l.x = n
l.p = n
l.o = f
l.u = a
j.v = l
assert n.y.s.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.p: E = None
        self.r: G = None
        self.o: B = None
        self.u: D = None
        self.txt = txt

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

c = A("c")
f = B("f")
e = C("e")
a = D("a")
n = E("n")
l = F("l")
j = G("j")

c.t = f
c.z = a
f.p = n
f.w = j
f.u = j
f.z = a
f.o = e
e.r = l
e.s = a
e.x = n
a.t = c
a.y = j
a.r = j
a.s = j
n.y = a
l.z = j
l.r = j
l.x = n
l.p = n
l.o = f
l.u = a
j.v = l
assert n.y.s.v.o.txt == "f"