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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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