class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.z: H = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.q: C = None
        self.s: I = None
        self.z: B = None
        self.v: F = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.q: C = None
        self.s: I = None
        self.z: B = None
        self.v: F = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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