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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.v: D = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: G = None
        self.o: E = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.v: D = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: G = None
        self.o: E = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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