class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

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

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

e = A("e")
l = B("l")
k = C("k")
a = B("a")
h = C("h")
b = A("b")
j = A("j")
c = C("c")
n = A("n")

e.q = l
e.o = a
e.w = a
l.s = b
l.t = j
k.v = n
k.s = n
k.w = c
a.s = j
a.t = n
h.v = e
h.w = c
h.s = n
b.q = a
b.w = a
b.o = l
j.q = l
j.o = l
j.w = a
c.v = j
c.s = j
c.w = k
n.q = l
n.o = l
n.w = a
assert b.o.t.q.s.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

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

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

e = A("e")
l = B("l")
k = C("k")
a = B("a")
h = C("h")
b = A("b")
j = A("j")
c = C("c")
n = A("n")

e.q = l
e.o = a
e.w = a
l.s = b
l.t = j
k.v = n
k.s = n
k.w = c
a.s = j
a.t = n
h.v = e
h.w = c
h.s = n
b.q = a
b.w = a
b.o = l
j.q = l
j.o = l
j.w = a
c.v = j
c.s = j
c.w = k
n.q = l
n.o = l
n.w = a
assert b.o.t.q.s.o.t.txt == "j"