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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.y: D = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: A = None
        self.o: E = None
        self.z: D = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

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

j = A("j")
m = B("m")
d = C("d")
n = D("n")
h = E("h")
g = F("g")
a = G("a")
b = H("b")

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.y: D = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: A = None
        self.o: E = None
        self.z: D = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

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

j = A("j")
m = B("m")
d = C("d")
n = D("n")
h = E("h")
g = F("g")
a = G("a")
b = H("b")

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