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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.y: E = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.y: E = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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