class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: J = None
        self.r: F = None
        self.w: F = None
        self.x: G = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: E = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.z: F = None
        self.r: G = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: I = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: I = None
        self.w: G = None
        self.z: H = None
        self.u: F = None
        self.o: F = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: E = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.z: F = None
        self.r: G = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.o: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: I = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: I = None
        self.w: G = None
        self.z: H = None
        self.u: F = None
        self.o: F = None
        self.r: A = None
        self.txt = txt

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

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