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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: G = None
        self.t: E = None
        self.p: F = None
        self.x: C = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.z: D = None
        self.w: E = None
        self.p: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.s: D = None
        self.o: B = None
        self.u: D = None
        self.q: D = None
        self.w: F = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: G = None
        self.t: E = None
        self.p: F = None
        self.x: C = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.z: D = None
        self.w: E = None
        self.p: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.s: D = None
        self.o: B = None
        self.u: D = None
        self.q: D = None
        self.w: F = None
        self.r: F = None
        self.txt = txt

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

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