class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: A = None
        self.w: G = None
        self.o: A = None
        self.y: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.o: D = None
        self.v: G = None
        self.r: G = None
        self.s: E = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: F = None
        self.r: B = None
        self.u: E = None
        self.s: B = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: A = None
        self.w: G = None
        self.o: A = None
        self.y: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.o: D = None
        self.v: G = None
        self.r: G = None
        self.s: E = None
        self.t: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: F = None
        self.r: B = None
        self.u: E = None
        self.s: B = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

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

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

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