class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: D = None
        self.t: D = None
        self.v: C = None
        self.s: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.o: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.o: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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