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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.t: C = None
        self.y: E = None
        self.v: C = None
        self.w: I = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: I = None
        self.x: I = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.o: A = None
        self.z: H = None
        self.t: E = None
        self.u: F = None
        self.y: D = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: G = None
        self.t: C = None
        self.y: E = None
        self.v: C = None
        self.w: I = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: I = None
        self.x: I = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.o: A = None
        self.z: H = None
        self.t: E = None
        self.u: F = None
        self.y: D = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

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

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

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