class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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