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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

b.y = h
b.x = j
e.o = d
e.t = d
e.v = h
e.u = h
e.p = h
h.s = m
h.q = m
h.u = e
h.o = g
g.u = b
g.y = h
i.s = l
i.q = b
i.o = j
l.v = n
l.o = n
l.t = d
l.q = b
l.p = j
n.o = d
n.t = d
n.v = h
n.u = h
n.p = h
m.o = d
m.t = d
m.v = h
m.u = h
m.p = h
j.s = l
j.q = b
j.o = i
d.o = m
d.v = h
d.u = h
d.p = h
d.t = e
assert l.p.q.y.s.o.t.p.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

b.y = h
b.x = j
e.o = d
e.t = d
e.v = h
e.u = h
e.p = h
h.s = m
h.q = m
h.u = e
h.o = g
g.u = b
g.y = h
i.s = l
i.q = b
i.o = j
l.v = n
l.o = n
l.t = d
l.q = b
l.p = j
n.o = d
n.t = d
n.v = h
n.u = h
n.p = h
m.o = d
m.t = d
m.v = h
m.u = h
m.p = h
j.s = l
j.q = b
j.o = i
d.o = m
d.v = h
d.u = h
d.p = h
d.t = e
assert l.p.q.y.s.o.t.p.s.t.txt == "d"