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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: C = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.o: D = None
        self.x: C = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.y: H = None
        self.u: C = None
        self.z: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: C = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.o: D = None
        self.x: C = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.y: H = None
        self.u: C = None
        self.z: F = None
        self.r: E = None
        self.txt = txt

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

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

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