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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

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

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

b = A("b")
f = B("f")
e = C("e")
l = D("l")
a = E("a")
n = F("n")
i = G("i")
m = H("m")
g = G("g")
j = A("j")

b.r = j
f.z = n
f.x = n
f.w = j
f.u = j
f.v = j
f.r = e
f.s = m
f.q = b
e.v = g
l.r = e
l.v = j
l.x = f
l.w = f
l.t = m
l.y = a
a.t = l
a.w = l
a.s = l
a.q = m
n.w = e
i.x = n
i.w = n
i.t = l
i.v = a
m.x = i
g.x = n
g.w = n
g.t = l
g.v = a
j.r = b
assert g.t.r.v.v.q.x.t.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

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

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

b = A("b")
f = B("f")
e = C("e")
l = D("l")
a = E("a")
n = F("n")
i = G("i")
m = H("m")
g = G("g")
j = A("j")

b.r = j
f.z = n
f.x = n
f.w = j
f.u = j
f.v = j
f.r = e
f.s = m
f.q = b
e.v = g
l.r = e
l.v = j
l.x = f
l.w = f
l.t = m
l.y = a
a.t = l
a.w = l
a.s = l
a.q = m
n.w = e
i.x = n
i.w = n
i.t = l
i.v = a
m.x = i
g.x = n
g.w = n
g.t = l
g.v = a
j.r = b
assert g.t.r.v.v.q.x.t.t.x.txt == "i"