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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.u: C = None
        self.y: E = None
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: H = None
        self.w: H = None
        self.p: I = None
        self.v: B = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.u: C = None
        self.y: E = None
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: H = None
        self.w: H = None
        self.p: I = None
        self.v: B = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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