class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: E = None
        self.v: F = None
        self.y: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: H = None
        self.u: D = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: E = None
        self.t: H = None
        self.p: C = None
        self.z: H = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: H = None
        self.u: D = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: E = None
        self.t: H = None
        self.p: C = None
        self.z: H = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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