class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: J = None
        self.u: I = None
        self.q: G = None
        self.z: J = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.w: I = None
        self.t: I = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: I = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.u: C = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.q: C = None
        self.o: F = None
        self.u: A = None
        self.y: D = None
        self.s: A = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.w: I = None
        self.t: I = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: I = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.u: C = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.q: C = None
        self.o: F = None
        self.u: A = None
        self.y: D = None
        self.s: A = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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