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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: F = None
        self.u: F = None
        self.z: B = None
        self.r: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: I = None
        self.o: G = None
        self.x: B = None
        self.v: H = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

a = A("a")
f = B("f")
n = C("n")
m = D("m")
k = E("k")
e = F("e")
l = G("l")
b = H("b")
d = I("d")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: F = None
        self.u: F = None
        self.z: B = None
        self.r: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: I = None
        self.o: G = None
        self.x: B = None
        self.v: H = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

a = A("a")
f = B("f")
n = C("n")
m = D("m")
k = E("k")
e = F("e")
l = G("l")
b = H("b")
d = I("d")
h = B("h")

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