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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.y: A = None
        self.u: D = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.r: C = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.y: A = None
        self.u: D = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.r: C = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.r: D = None
        self.txt = txt

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

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