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

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

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

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

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

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

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

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

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

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

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

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

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

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

i.o = n
e.o = i
e.q = i
e.r = d
e.s = b
e.z = k
d.o = e
d.w = i
d.t = k
d.v = b
g.t = d
g.o = b
g.s = k
b.p = i
n.s = e
j.o = i
j.q = i
j.r = d
j.s = b
j.z = g
c.o = i
c.q = i
c.r = d
c.s = b
c.z = g
l.o = i
l.q = i
l.r = d
l.s = b
l.z = g
k.t = d
k.o = b
k.s = g
assert n.s.r.o.s.p.o.s.z.t.txt == "d"