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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

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

e = A("e")
i = B("i")
j = C("j")
g = D("g")
f = E("f")
m = F("m")
k = E("k")
l = C("l")

e.w = l
i.u = k
i.t = e
j.s = f
j.w = f
j.u = g
j.o = g
j.t = e
j.y = e
g.v = m
f.w = g
f.u = g
f.r = m
f.q = l
m.r = i
m.w = g
m.q = l
k.w = g
k.u = g
k.r = m
k.q = l
l.s = k
l.u = g
l.o = g
l.t = e
l.y = e
l.w = f
assert e.w.s.r.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

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

e = A("e")
i = B("i")
j = C("j")
g = D("g")
f = E("f")
m = F("m")
k = E("k")
l = C("l")

e.w = l
i.u = k
i.t = e
j.s = f
j.w = f
j.u = g
j.o = g
j.t = e
j.y = e
g.v = m
f.w = g
f.u = g
f.r = m
f.q = l
m.r = i
m.w = g
m.q = l
k.w = g
k.u = g
k.r = m
k.q = l
l.s = k
l.u = g
l.o = g
l.t = e
l.y = e
l.w = f
assert e.w.s.r.q.t.txt == "e"