class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: E = None
        self.w: G = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.q: F = None
        self.z: H = None
        self.y: G = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: C = None
        self.y: C = None
        self.o: H = None
        self.u: G = None
        self.v: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: I = None
        self.x: G = None
        self.u: I = None
        self.w: C = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.q: F = None
        self.z: H = None
        self.y: G = None
        self.u: F = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: C = None
        self.y: C = None
        self.o: H = None
        self.u: G = None
        self.v: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: I = None
        self.x: G = None
        self.u: I = None
        self.w: C = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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