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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

l.t = j
l.s = d
l.o = d
l.y = d
l.q = h
l.z = n
h.t = b
h.s = j
h.p = f
n.r = h
n.x = f
n.o = f
c.o = f
c.t = b
j.x = n
d.o = h
d.y = f
f.x = n
b.r = h
b.x = f
b.o = f
a.t = j
a.s = d
a.o = d
a.y = d
a.q = h
a.z = n
k.t = j
k.s = d
k.o = d
k.y = d
k.q = h
k.z = n
assert l.z.r.s.x.r.p.x.r.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: F = None
        self.o: F = None
        self.q: B = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

l.t = j
l.s = d
l.o = d
l.y = d
l.q = h
l.z = n
h.t = b
h.s = j
h.p = f
n.r = h
n.x = f
n.o = f
c.o = f
c.t = b
j.x = n
d.o = h
d.y = f
f.x = n
b.r = h
b.x = f
b.o = f
a.t = j
a.s = d
a.o = d
a.y = d
a.q = h
a.z = n
k.t = j
k.s = d
k.o = d
k.y = d
k.q = h
k.z = n
assert l.z.r.s.x.r.p.x.r.t.o.txt == "f"