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

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

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

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

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

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

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

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

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

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

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

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

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

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

e.x = f
e.r = c
d.r = m
d.s = c
i.t = m
f.w = e
f.o = e
f.q = i
c.y = m
c.s = l
c.x = j
c.r = d
j.t = e
j.w = c
j.v = f
j.p = f
j.s = i
j.q = l
m.t = e
m.w = c
m.v = f
m.p = f
m.s = i
m.q = d
l.r = m
l.s = c
assert l.s.y.v.q.t.q.s.x.txt == "j"