class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.t: D = None
        self.s: C = None
        self.r: C = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: G = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: G = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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