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

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

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

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

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

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

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

i.q = k
i.o = k
i.p = k
i.t = b
i.s = l
i.w = e
h.q = d
f.u = h
f.w = e
f.t = b
k.y = f
k.s = b
k.w = i
b.o = i
l.y = c
l.t = d
l.o = d
l.s = d
d.y = c
d.t = l
d.o = l
d.s = l
g.q = d
c.u = g
c.w = i
c.t = b
e.q = k
e.o = k
e.p = k
e.t = b
e.s = l
e.w = i
assert k.y.w.w.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.o: D = None
        self.s: F = None
        self.w: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

i.q = k
i.o = k
i.p = k
i.t = b
i.s = l
i.w = e
h.q = d
f.u = h
f.w = e
f.t = b
k.y = f
k.s = b
k.w = i
b.o = i
l.y = c
l.t = d
l.o = d
l.s = d
d.y = c
d.t = l
d.o = l
d.s = l
g.q = d
c.u = g
c.w = i
c.t = b
e.q = k
e.o = k
e.p = k
e.t = b
e.s = l
e.w = i
assert k.y.w.w.s.o.txt == "d"