class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.t: C = None
        self.s: C = None
        self.p: F = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.z: B = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.z: B = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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