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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.x: D = None
        self.w: B = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.x: D = None
        self.w: B = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

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

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

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