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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.y: F = None
        self.q: F = None
        self.w: I = None
        self.z: F = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: I = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.y: F = None
        self.q: F = None
        self.w: I = None
        self.z: F = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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