class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: D = None
        self.x: E = None
        self.o: A = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

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

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

g = A("g")
n = B("n")
c = C("c")
h = D("h")
e = E("e")
f = F("f")
d = F("d")
l = D("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: D = None
        self.x: E = None
        self.o: A = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

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

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

g = A("g")
n = B("n")
c = C("c")
h = D("h")
e = E("e")
f = F("f")
d = F("d")
l = D("l")

g.s = n
g.z = e
g.v = e
n.o = e
n.x = d
c.o = n
c.u = f
c.z = e
c.x = e
c.w = e
c.s = h
h.u = n
h.y = l
h.x = e
h.o = g
h.v = g
h.q = g
e.y = h
e.q = n
e.v = c
f.z = e
f.v = n
f.o = d
d.z = e
d.v = n
d.o = f
l.u = n
l.y = h
l.x = e
l.o = g
l.v = g
l.q = g
assert c.s.x.q.txt == "n"