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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.w: D = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

b = A("b")
g = B("g")
l = C("l")
a = D("a")
e = E("e")
c = F("c")
h = F("h")
j = D("j")
m = B("m")
i = A("i")

b.s = g
b.v = i
b.t = l
g.p = i
l.s = e
a.y = e
a.u = l
a.w = j
a.r = m
a.z = c
e.v = m
c.t = l
c.p = b
h.t = l
h.p = i
j.y = e
j.u = l
j.w = a
j.r = m
j.z = c
m.p = i
i.s = g
i.v = b
i.t = l
assert c.t.s.v.p.v.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.w: D = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

b = A("b")
g = B("g")
l = C("l")
a = D("a")
e = E("e")
c = F("c")
h = F("h")
j = D("j")
m = B("m")
i = A("i")

b.s = g
b.v = i
b.t = l
g.p = i
l.s = e
a.y = e
a.u = l
a.w = j
a.r = m
a.z = c
e.v = m
c.t = l
c.p = b
h.t = l
h.p = i
j.y = e
j.u = l
j.w = a
j.r = m
j.z = c
m.p = i
i.s = g
i.v = b
i.t = l
assert c.t.s.v.p.v.s.p.txt == "i"