class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: F = None
        self.p: G = None
        self.o: E = None
        self.u: F = None
        self.x: G = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.o: C = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.r: A = None
        self.w: C = None
        self.u: C = None
        self.q: B = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: F = None
        self.p: G = None
        self.o: E = None
        self.u: F = None
        self.x: G = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.o: C = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.r: A = None
        self.w: C = None
        self.u: C = None
        self.q: B = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

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