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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: A = None
        self.w: F = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: G = None
        self.u: B = None
        self.r: D = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.w: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: E = None
        self.s: A = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

b = A("b")
c = B("c")
d = C("d")
j = D("j")
i = E("i")
g = F("g")
f = G("f")
n = H("n")
a = I("a")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: A = None
        self.w: F = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: G = None
        self.u: B = None
        self.r: D = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.w: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: E = None
        self.s: A = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

b = A("b")
c = B("c")
d = C("d")
j = D("j")
i = E("i")
g = F("g")
f = G("f")
n = H("n")
a = I("a")
k = J("k")

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