class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: A = None
        self.u: D = None
        self.r: E = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: A = None
        self.u: D = None
        self.r: E = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

c.p = n
c.z = i
c.y = j
a.o = i
a.z = i
a.x = d
a.t = d
b.u = c
n.y = m
n.w = l
i.v = d
i.q = d
i.s = j
j.v = c
j.o = c
j.t = c
j.u = n
j.r = l
j.z = i
m.o = l
m.z = l
m.x = d
m.t = d
d.y = m
d.w = l
f.o = i
f.z = i
f.x = d
f.t = d
l.v = d
l.q = d
l.s = j
assert i.s.r.s.u.y.o.s.u.y.txt == "m"