class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.x: H = None
        self.p: C = None
        self.s: H = None
        self.z: C = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.w: A = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.w: E = None
        self.t: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.x: H = None
        self.p: C = None
        self.s: H = None
        self.z: C = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.w: A = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.w: E = None
        self.t: H = None
        self.q: D = None
        self.txt = txt

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

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