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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: A = None
        self.txt = txt

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

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

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

i.o = l
h.q = e
c.v = g
c.u = h
c.p = i
g.u = e
g.t = l
g.s = i
e.x = g
l.r = e
l.y = e
l.q = c
l.u = h
a.r = e
a.y = e
a.q = c
a.u = h
j.q = e
assert c.v.s.o.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: A = None
        self.txt = txt

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

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

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

i.o = l
h.q = e
c.v = g
c.u = h
c.p = i
g.u = e
g.t = l
g.s = i
e.x = g
l.r = e
l.y = e
l.q = c
l.u = h
a.r = e
a.y = e
a.q = c
a.u = h
j.q = e
assert c.v.s.o.q.p.txt == "i"