class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.t: G = None
        self.o: G = None
        self.u: G = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: I = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: H = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.t: G = None
        self.o: G = None
        self.u: G = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: I = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: H = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.txt = txt

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

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