class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: C = None
        self.u: C = None
        self.x: E = None
        self.p: H = None
        self.v: B = None
        self.s: J = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: C = None
        self.y: B = None
        self.z: C = None
        self.s: H = None
        self.o: F = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: E = None
        self.x: B = None
        self.s: I = None
        self.w: J = None
        self.r: E = None
        self.p: E = None
        self.o: J = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: D = None
        self.s: E = None
        self.q: D = None
        self.t: J = None
        self.v: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.w: E = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: C = None
        self.y: B = None
        self.z: C = None
        self.s: H = None
        self.o: F = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: E = None
        self.x: B = None
        self.s: I = None
        self.w: J = None
        self.r: E = None
        self.p: E = None
        self.o: J = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: D = None
        self.s: E = None
        self.q: D = None
        self.t: J = None
        self.v: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.w: E = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

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