class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: I = None
        self.z: G = None
        self.u: B = None
        self.y: C = None
        self.x: G = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: F = None
        self.z: F = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: F = None
        self.z: F = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

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

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