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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: E = None
        self.w: C = None
        self.y: F = None
        self.u: G = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.p: G = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: E = None
        self.w: C = None
        self.y: F = None
        self.u: G = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.p: G = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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