class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: J = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.v: A = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.x: F = None
        self.txt = txt

f = A("f")
m = B("m")
d = C("d")
g = D("g")
k = E("k")
i = F("i")
e = G("e")
j = H("j")
n = I("n")
l = J("l")

f.w = e
f.o = d
m.w = f
m.z = f
m.t = j
m.s = d
m.q = d
m.o = n
m.x = n
m.p = i
m.y = l
m.r = k
d.y = j
d.r = j
g.o = k
g.r = l
k.r = d
k.s = j
i.z = e
i.o = l
i.y = m
e.o = g
e.r = m
e.z = m
e.v = f
e.w = f
j.w = m
j.r = e
j.v = n
n.x = j
n.o = j
n.s = g
n.p = g
n.v = f
n.r = k
n.y = m
l.z = g
l.o = e
l.x = i
assert g.r.o.o.o.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: J = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.v: A = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.x: F = None
        self.txt = txt

f = A("f")
m = B("m")
d = C("d")
g = D("g")
k = E("k")
i = F("i")
e = G("e")
j = H("j")
n = I("n")
l = J("l")

f.w = e
f.o = d
m.w = f
m.z = f
m.t = j
m.s = d
m.q = d
m.o = n
m.x = n
m.p = i
m.y = l
m.r = k
d.y = j
d.r = j
g.o = k
g.r = l
k.r = d
k.s = j
i.z = e
i.o = l
i.y = m
e.o = g
e.r = m
e.z = m
e.v = f
e.w = f
j.w = m
j.r = e
j.v = n
n.x = j
n.o = j
n.s = g
n.p = g
n.v = f
n.r = k
n.y = m
l.z = g
l.o = e
l.x = i
assert g.r.o.o.o.r.txt == "d"