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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: F = None
        self.t: E = None
        self.z: B = None
        self.s: H = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: D = None
        self.x: G = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: F = None
        self.t: E = None
        self.z: B = None
        self.s: H = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: D = None
        self.x: G = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

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

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

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