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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.y: H = None
        self.x: H = None
        self.r: E = None
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.v: A = None
        self.q: C = None
        self.y: C = None
        self.p: A = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.y: H = None
        self.x: H = None
        self.r: E = None
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.v: A = None
        self.q: C = None
        self.y: C = None
        self.p: A = None
        self.o: G = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.txt = txt

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

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