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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.x: B = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.x: C = None
        self.o: F = None
        self.q: E = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.x: B = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.x: C = None
        self.o: F = None
        self.q: E = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

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

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