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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: F = None
        self.w: I = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.t: A = None
        self.q: I = None
        self.u: G = None
        self.y: A = None
        self.s: D = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.q: F = None
        self.u: D = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: F = None
        self.w: I = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.t: A = None
        self.q: I = None
        self.u: G = None
        self.y: A = None
        self.s: D = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.q: F = None
        self.u: D = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

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

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