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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.u: F = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.u: G = None
        self.p: F = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.txt = txt

l = A("l")
e = B("e")
i = C("i")
c = D("c")
n = E("n")
b = F("b")
j = G("j")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.u: F = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.u: G = None
        self.p: F = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.txt = txt

l = A("l")
e = B("e")
i = C("i")
c = D("c")
n = E("n")
b = F("b")
j = G("j")
f = H("f")

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