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

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

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

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

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

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

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

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

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

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

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

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

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

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

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