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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.x: B = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.x: B = None
        self.r: D = None
        self.t: C = None
        self.txt = txt

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

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

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