class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.q: H = None
        self.v: F = None
        self.r: D = None
        self.o: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: G = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: H = None
        self.s: D = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: G = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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