class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.p: A = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.p: A = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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