class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: H = None
        self.u: F = None
        self.s: G = None
        self.x: E = None
        self.r: H = None
        self.q: E = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: G = None
        self.q: E = None
        self.s: B = None
        self.o: F = None
        self.y: A = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: G = None
        self.q: E = None
        self.s: B = None
        self.o: F = None
        self.y: A = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

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