class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: D = None
        self.v: E = None
        self.p: D = None
        self.r: C = None
        self.q: B = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: D = None
        self.s: D = None
        self.r: F = None
        self.q: G = None
        self.y: F = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: H = None
        self.q: F = None
        self.o: H = None
        self.s: A = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: D = None
        self.s: D = None
        self.r: F = None
        self.q: G = None
        self.y: F = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: H = None
        self.q: F = None
        self.o: H = None
        self.s: A = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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