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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: A = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.v: H = None
        self.w: C = None
        self.p: F = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.txt = txt

e = A("e")
c = B("c")
n = C("n")
l = D("l")
i = E("i")
m = F("m")
b = G("b")
d = H("d")
a = A("a")
k = F("k")

e.w = i
e.t = c
c.o = b
n.s = b
n.o = a
n.w = e
l.t = d
l.x = a
l.y = k
i.t = c
m.r = i
m.t = i
b.s = i
b.q = a
b.v = d
b.w = n
b.p = m
b.y = m
b.t = k
d.r = i
d.v = n
a.w = i
a.t = c
k.r = i
k.t = i
assert e.t.o.p.r.t.o.q.w.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: A = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.v: H = None
        self.w: C = None
        self.p: F = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.txt = txt

e = A("e")
c = B("c")
n = C("n")
l = D("l")
i = E("i")
m = F("m")
b = G("b")
d = H("d")
a = A("a")
k = F("k")

e.w = i
e.t = c
c.o = b
n.s = b
n.o = a
n.w = e
l.t = d
l.x = a
l.y = k
i.t = c
m.r = i
m.t = i
b.s = i
b.q = a
b.v = d
b.w = n
b.p = m
b.y = m
b.t = k
d.r = i
d.v = n
a.w = i
a.t = c
k.r = i
k.t = i
assert e.t.o.p.r.t.o.q.w.t.o.txt == "b"