class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.w: I = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: H = None
        self.z: C = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.q: F = None
        self.u: B = None
        self.x: C = None
        self.y: E = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.o: E = None
        self.w: I = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: H = None
        self.z: C = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.q: F = None
        self.u: B = None
        self.x: C = None
        self.y: E = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.o: E = None
        self.w: I = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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