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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: F = None
        self.x: F = None
        self.u: C = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.u: D = None
        self.z: H = None
        self.o: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.w: A = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

c = A("c")
h = B("h")
a = C("a")
j = D("j")
m = E("m")
b = F("b")
g = G("g")
f = H("f")
l = B("l")
k = C("k")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: F = None
        self.x: F = None
        self.u: C = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.u: D = None
        self.z: H = None
        self.o: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.w: A = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

c = A("c")
h = B("h")
a = C("a")
j = D("j")
m = E("m")
b = F("b")
g = G("g")
f = H("f")
l = B("l")
k = C("k")

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