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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.txt = txt

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

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

c = A("c")
h = B("h")
n = C("n")
a = D("a")
i = E("i")
e = F("e")
j = D("j")
d = E("d")
k = D("k")
g = B("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.txt = txt

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

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

c = A("c")
h = B("h")
n = C("n")
a = D("a")
i = E("i")
e = F("e")
j = D("j")
d = E("d")
k = D("k")
g = B("g")

c.x = k
c.z = g
c.v = n
c.s = n
c.o = i
h.q = d
h.o = e
h.x = e
h.u = n
n.p = c
n.y = g
n.v = i
n.t = j
a.q = k
a.s = g
i.p = c
i.q = c
i.v = c
i.z = e
i.u = e
e.w = n
e.o = d
j.q = k
j.s = g
d.p = c
d.q = c
d.v = c
d.z = e
d.u = e
k.q = j
k.s = h
g.q = i
g.o = e
g.x = e
g.u = n
assert i.q.x.s.q.v.txt == "c"