class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: B = None
        self.t: I = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.y: D = None
        self.v: A = None
        self.r: I = None
        self.s: G = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.w: G = None
        self.v: H = None
        self.u: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: F = None
        self.w: C = None
        self.v: H = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.s: B = None
        self.x: B = None
        self.t: A = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.t: G = None
        self.q: G = None
        self.z: B = None
        self.p: G = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: B = None
        self.r: F = None
        self.p: D = None
        self.z: I = None
        self.t: I = None
        self.o: D = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.y: D = None
        self.v: A = None
        self.r: I = None
        self.s: G = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.w: G = None
        self.v: H = None
        self.u: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: F = None
        self.w: C = None
        self.v: H = None
        self.r: I = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.s: B = None
        self.x: B = None
        self.t: A = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.t: G = None
        self.q: G = None
        self.z: B = None
        self.p: G = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: B = None
        self.r: F = None
        self.p: D = None
        self.z: I = None
        self.t: I = None
        self.o: D = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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