class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.u: H = None
        self.x: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: E = None
        self.r: E = None
        self.t: C = None
        self.z: H = None
        self.y: D = None
        self.p: B = None
        self.s: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: H = None
        self.u: I = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.u: H = None
        self.x: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: E = None
        self.r: E = None
        self.t: C = None
        self.z: H = None
        self.y: D = None
        self.p: B = None
        self.s: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: H = None
        self.u: I = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

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