class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: A = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.w: C = None
        self.r: F = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.w: C = None
        self.r: F = None
        self.z: F = None
        self.s: A = None
        self.txt = txt

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

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