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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: A = None
        self.q: G = None
        self.x: B = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

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

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

f = A("f")
i = B("i")
d = C("d")
h = D("h")
c = E("c")
j = F("j")
k = G("k")
m = H("m")
n = F("n")

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: A = None
        self.q: G = None
        self.x: B = None
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

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

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

f = A("f")
i = B("i")
d = C("d")
h = D("h")
c = E("c")
j = F("j")
k = G("k")
m = H("m")
n = F("n")

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