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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.u: G = None
        self.r: E = None
        self.t: G = None
        self.y: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

i = A("i")
g = B("g")
j = C("j")
n = D("n")
h = E("h")
d = F("d")
a = G("a")
c = H("c")
m = I("m")
b = F("b")

i.x = a
i.r = c
i.s = j
i.w = g
i.p = h
g.r = b
g.z = a
g.x = j
g.y = i
g.p = m
g.s = n
g.v = c
j.q = d
j.o = d
j.w = h
j.z = a
j.y = b
j.t = n
j.u = c
n.z = h
n.p = m
n.q = d
n.t = a
n.v = c
n.s = c
h.s = j
d.v = c
d.y = c
d.w = h
d.r = h
d.u = a
d.t = a
d.z = a
a.o = i
c.r = i
c.o = d
c.y = j
m.u = g
m.r = g
m.s = g
m.v = h
m.p = j
m.t = c
b.v = c
b.y = c
b.w = h
b.r = h
b.u = a
b.t = a
b.z = a
assert j.u.r.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: H = None
        self.s: C = None
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.u: G = None
        self.r: E = None
        self.t: G = None
        self.y: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

i = A("i")
g = B("g")
j = C("j")
n = D("n")
h = E("h")
d = F("d")
a = G("a")
c = H("c")
m = I("m")
b = F("b")

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