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

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

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

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

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

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

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

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

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

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

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

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

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

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

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