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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: H = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: G = None
        self.z: H = None
        self.r: G = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: H = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: G = None
        self.z: H = None
        self.r: G = None
        self.t: A = None
        self.txt = txt

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

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