class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: A = None
        self.y: C = None
        self.p: C = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.s: E = None
        self.u: B = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: B = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

g = A("g")
h = B("h")
n = C("n")
a = D("a")
m = E("m")
c = F("c")
l = E("l")
b = E("b")
j = C("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: A = None
        self.y: C = None
        self.p: C = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.s: E = None
        self.u: B = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: B = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

g = A("g")
h = B("h")
n = C("n")
a = D("a")
m = E("m")
c = F("c")
l = E("l")
b = E("b")
j = C("j")

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