class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.z: H = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.r: A = None
        self.s: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

e = A("e")
n = B("n")
l = C("l")
c = D("c")
h = E("h")
j = F("j")
g = G("g")
a = H("a")

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.z: H = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.r: A = None
        self.s: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

e = A("e")
n = B("n")
l = C("l")
c = D("c")
h = E("h")
j = F("j")
g = G("g")
a = H("a")

e.q = a
e.t = g
n.v = c
n.q = a
n.z = a
n.r = j
n.u = j
l.p = g
l.s = g
l.u = h
l.r = e
l.x = a
c.r = n
c.s = g
c.x = a
h.y = g
h.o = g
h.v = a
h.t = c
h.p = l
h.s = e
j.y = n
g.v = n
g.o = h
g.r = a
g.u = a
g.q = e
g.x = c
a.v = c
a.p = l
a.s = j
assert j.y.z.v.txt == "c"