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

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

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

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

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

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

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

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

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

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

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

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

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

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

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