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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.x: E = None
        self.v: E = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.t: I = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.x: E = None
        self.v: E = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: E = None
        self.t: I = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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