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

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

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

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

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

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

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

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

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

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

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

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

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

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

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