class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.r: C = None
        self.p: B = None
        self.u: H = None
        self.t: G = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.v: G = None
        self.p: I = None
        self.t: D = None
        self.q: H = None
        self.x: I = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: G = None
        self.v: G = None
        self.p: I = None
        self.t: D = None
        self.q: H = None
        self.x: I = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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