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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: F = None
        self.x: H = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.x: C = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

l = A("l")
c = B("c")
i = C("i")
j = D("j")
g = E("g")
f = F("f")
d = G("d")
k = H("k")
e = I("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: F = None
        self.x: H = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.x: C = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

l = A("l")
c = B("c")
i = C("i")
j = D("j")
g = E("g")
f = F("f")
d = G("d")
k = H("k")
e = I("e")

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