class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.r: D = None
        self.u: I = None
        self.w: H = None
        self.t: H = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.x: A = None
        self.z: I = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.y: G = None
        self.s: E = None
        self.r: A = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: D = None
        self.p: E = None
        self.r: C = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.p: I = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.x: A = None
        self.z: I = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.y: G = None
        self.s: E = None
        self.r: A = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: D = None
        self.p: E = None
        self.r: C = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.p: I = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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