class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.p: D = None
        self.q: D = None
        self.u: I = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.o: C = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.r: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.o: C = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.r: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: F = None
        self.txt = txt

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

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