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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: I = None
        self.p: C = None
        self.w: G = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: G = None
        self.r: B = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: G = None
        self.t: D = None
        self.x: G = None
        self.w: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: I = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

c = A("c")
h = B("h")
l = C("l")
b = D("b")
f = E("f")
g = F("g")
m = G("m")
e = H("e")
d = I("d")

c.p = h
c.y = l
h.t = m
h.w = m
h.u = d
h.p = l
h.z = f
l.q = f
l.w = m
l.r = h
l.u = d
b.t = e
b.v = c
b.y = m
f.y = b
f.z = e
f.p = e
f.u = e
f.t = h
f.w = d
f.s = g
g.u = d
g.z = m
g.x = m
g.t = b
g.w = h
g.r = l
m.x = d
m.t = d
m.q = l
m.v = l
e.p = c
d.u = g
d.p = g
d.o = f
d.r = f
d.s = f
d.z = c
d.q = b
d.w = e
d.v = m
assert h.w.q.r.u.s.y.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: I = None
        self.p: C = None
        self.w: G = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: G = None
        self.r: B = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: G = None
        self.t: D = None
        self.x: G = None
        self.w: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: I = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

c = A("c")
h = B("h")
l = C("l")
b = D("b")
f = E("f")
g = F("g")
m = G("m")
e = H("e")
d = I("d")

c.p = h
c.y = l
h.t = m
h.w = m
h.u = d
h.p = l
h.z = f
l.q = f
l.w = m
l.r = h
l.u = d
b.t = e
b.v = c
b.y = m
f.y = b
f.z = e
f.p = e
f.u = e
f.t = h
f.w = d
f.s = g
g.u = d
g.z = m
g.x = m
g.t = b
g.w = h
g.r = l
m.x = d
m.t = d
m.q = l
m.v = l
e.p = c
d.u = g
d.p = g
d.o = f
d.r = f
d.s = f
d.z = c
d.q = b
d.w = e
d.v = m
assert h.w.q.r.u.s.y.y.t.txt == "d"