class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: C = None
        self.t: B = None
        self.z: E = None
        self.p: B = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.v: I = None
        self.x: H = None
        self.s: G = None
        self.z: A = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: I = None
        self.r: G = None
        self.z: D = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: A = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: A = None
        self.w: J = None
        self.p: H = None
        self.q: H = None
        self.o: I = None
        self.v: B = None
        self.x: A = None
        self.y: J = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: J = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: C = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.v: I = None
        self.x: H = None
        self.s: G = None
        self.z: A = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: I = None
        self.r: G = None
        self.z: D = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: A = None
        self.u: H = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: A = None
        self.w: J = None
        self.p: H = None
        self.q: H = None
        self.o: I = None
        self.v: B = None
        self.x: A = None
        self.y: J = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: J = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: C = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

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

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

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