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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: A = None
        self.s: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: A = None
        self.s: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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