class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: D = None
        self.p: G = None
        self.z: C = None
        self.q: I = None
        self.x: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.q: A = None
        self.u: C = None
        self.y: H = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.q: A = None
        self.u: C = None
        self.y: H = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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