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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.x: F = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.u: A = None
        self.w: A = None
        self.y: C = None
        self.t: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.x: F = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.u: A = None
        self.w: A = None
        self.y: C = None
        self.t: F = None
        self.s: A = None
        self.txt = txt

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

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

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