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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: A = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: E = None
        self.x: A = None
        self.q: A = None
        self.o: G = None
        self.w: G = None
        self.t: G = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.z: E = None
        self.s: F = None
        self.p: G = None
        self.r: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: A = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: E = None
        self.x: A = None
        self.q: A = None
        self.o: G = None
        self.w: G = None
        self.t: G = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.z: E = None
        self.s: F = None
        self.p: G = None
        self.r: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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