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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: C = None
        self.s: I = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.v: I = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: E = None
        self.s: C = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.u: C = None
        self.q: G = None
        self.v: A = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: C = None
        self.s: I = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.v: I = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: E = None
        self.s: C = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.u: C = None
        self.q: G = None
        self.v: A = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

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

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